Contents | Index | < Browse | Browse >
LETTERgetsULETTER
Read a string from the standard input stream.
Overview
#include <stdio.h>
r = gets(s);
char *r;
char *s;
Portability
ANSI
Description
Reads a line from the standard input stream. The characters read (excluding
the trailing "\n" line feed) are copied into the string buffer pointed to by
"s".
The string buffer must be able to cover the longest possible string. Due to
its nature the standard input stream has no limits, that's why StormC's
implementation reads a maximum of 120 characters. If this is not enough,
fgets should be used.
Returns
If an error occured, zero is returned, otherwise the string pointer "s".